﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SlideControlDemo.Slides {
  public partial class SlideB : SlickInterface.Slide {
    public SlideB() {
      InitializeComponent();
    }
    
    protected override void OnSlidingIn() {
      Slides.SlideA a = this.SlideControl.FindByType<Slides.SlideA>();
      _lbl_date.Text = String.Format("You've chosen {0}\nas date on Slide A", a.DateTimePicker.Value.ToString("d")); 
      base.OnSlidingIn();
    }

    private void _btn_to_A_Click(object sender, EventArgs e) {
      this.SlideControl.ForwardTo<SlideA>();
    }

    private void _btn_to_C_Click(object sender, EventArgs e) {
      this.SlideControl.ForwardTo<SlideC>();
    }
  }
}
